DROP TABLE CRST_RCV_TRANSACTIONS;

CREATE TABLE CRST_RCV_TRANSACTIONS
(
  TRANSACTION_ID                NUMBER          NOT NULL,
  LAST_UPDATE_DATE              DATE            NOT NULL,
  LAST_UPDATED_BY               NUMBER          NOT NULL,
  CREATION_DATE                 DATE            NOT NULL,
  CREATED_BY                    NUMBER          NOT NULL,
  LAST_UPDATE_LOGIN             NUMBER,
  REQUEST_ID                    NUMBER,
  PROGRAM_APPLICATION_ID        NUMBER,
  PROGRAM_ID                    NUMBER,
  PROGRAM_UPDATE_DATE           DATE,
  TRANSACTION_TYPE              VARCHAR2(25 BYTE) NOT NULL,
  TRANSACTION_DATE              DATE            NOT NULL,
  QUANTITY                      NUMBER          NOT NULL,
  UNIT_OF_MEASURE               VARCHAR2(25 BYTE) NOT NULL,
  SHIPMENT_HEADER_ID            NUMBER          NOT NULL,
  SHIPMENT_LINE_ID              NUMBER          NOT NULL,
  USER_ENTERED_FLAG             VARCHAR2(1 BYTE) NOT NULL,
  INTERFACE_SOURCE_CODE         VARCHAR2(25 BYTE),
  INTERFACE_SOURCE_LINE_ID      NUMBER,
  INV_TRANSACTION_ID            NUMBER,
  SOURCE_DOCUMENT_CODE          VARCHAR2(25 BYTE),
  DESTINATION_TYPE_CODE         VARCHAR2(25 BYTE),
  PRIMARY_QUANTITY              NUMBER,
  PRIMARY_UNIT_OF_MEASURE       VARCHAR2(25 BYTE),
  UOM_CODE                      VARCHAR2(3 BYTE),
  EMPLOYEE_ID                   NUMBER(9),
  PARENT_TRANSACTION_ID         NUMBER,
  PO_HEADER_ID                  NUMBER,
  PO_RELEASE_ID                 NUMBER,
  PO_LINE_ID                    NUMBER,
  PO_LINE_LOCATION_ID           NUMBER,
  PO_DISTRIBUTION_ID            NUMBER,
  PO_REVISION_NUM               NUMBER,
  REQUISITION_LINE_ID           NUMBER,
  PO_UNIT_PRICE                 NUMBER,
  CURRENCY_CODE                 VARCHAR2(15 BYTE),
  CURRENCY_CONVERSION_TYPE      VARCHAR2(30 BYTE),
  CURRENCY_CONVERSION_RATE      NUMBER,
  CURRENCY_CONVERSION_DATE      DATE,
  ROUTING_HEADER_ID             NUMBER,
  ROUTING_STEP_ID               NUMBER,
  DELIVER_TO_PERSON_ID          NUMBER(9),
  DELIVER_TO_LOCATION_ID        NUMBER,
  VENDOR_ID                     NUMBER,
  VENDOR_SITE_ID                NUMBER,
  ORGANIZATION_ID               NUMBER,
  SUBINVENTORY                  VARCHAR2(10 BYTE),
  LOCATOR_ID                    NUMBER,
  WIP_ENTITY_ID                 NUMBER,
  WIP_LINE_ID                   NUMBER,
  WIP_REPETITIVE_SCHEDULE_ID    NUMBER,
  WIP_OPERATION_SEQ_NUM         NUMBER,
  WIP_RESOURCE_SEQ_NUM          NUMBER,
  BOM_RESOURCE_ID               NUMBER,
  LOCATION_ID                   NUMBER,
  SUBSTITUTE_UNORDERED_CODE     VARCHAR2(25 BYTE),
  RECEIPT_EXCEPTION_FLAG        VARCHAR2(1 BYTE),
  INSPECTION_STATUS_CODE        VARCHAR2(25 BYTE),
  ACCRUAL_STATUS_CODE           VARCHAR2(25 BYTE),
  INSPECTION_QUALITY_CODE       VARCHAR2(25 BYTE),
  VENDOR_LOT_NUM                VARCHAR2(30 BYTE),
  RMA_REFERENCE                 VARCHAR2(30 BYTE),
  COMMENTS                      VARCHAR2(240 BYTE),
  ATTRIBUTE_CATEGORY            VARCHAR2(30 BYTE),
  ATTRIBUTE1                    VARCHAR2(150 BYTE),
  ATTRIBUTE2                    VARCHAR2(150 BYTE),
  ATTRIBUTE3                    VARCHAR2(150 BYTE),
  ATTRIBUTE4                    VARCHAR2(150 BYTE),
  ATTRIBUTE5                    VARCHAR2(150 BYTE),
  ATTRIBUTE6                    VARCHAR2(150 BYTE),
  ATTRIBUTE7                    VARCHAR2(150 BYTE),
  ATTRIBUTE8                    VARCHAR2(150 BYTE),
  ATTRIBUTE9                    VARCHAR2(150 BYTE),
  ATTRIBUTE10                   VARCHAR2(150 BYTE),
  ATTRIBUTE11                   VARCHAR2(150 BYTE),
  ATTRIBUTE12                   VARCHAR2(150 BYTE),
  ATTRIBUTE13                   VARCHAR2(150 BYTE),
  ATTRIBUTE14                   VARCHAR2(150 BYTE),
  ATTRIBUTE15                   VARCHAR2(150 BYTE),
  REQ_DISTRIBUTION_ID           NUMBER,
  DEPARTMENT_CODE               VARCHAR2(10 BYTE),
  REASON_ID                     NUMBER,
  DESTINATION_CONTEXT           VARCHAR2(30 BYTE),
  LOCATOR_ATTRIBUTE             VARCHAR2(150 BYTE),
  CHILD_INSPECTION_FLAG         VARCHAR2(1 BYTE),
  SOURCE_DOC_UNIT_OF_MEASURE    VARCHAR2(25 BYTE),
  SOURCE_DOC_QUANTITY           NUMBER,
  INTERFACE_TRANSACTION_ID      NUMBER,
  GROUP_ID                      NUMBER,
  MOVEMENT_ID                   NUMBER,
  INVOICE_ID                    NUMBER,
  INVOICE_STATUS_CODE           VARCHAR2(25 BYTE),
  QA_COLLECTION_ID              NUMBER,
  MRC_CURRENCY_CONVERSION_TYPE  VARCHAR2(2000 BYTE),
  MRC_CURRENCY_CONVERSION_DATE  VARCHAR2(2000 BYTE),
  MRC_CURRENCY_CONVERSION_RATE  VARCHAR2(2000 BYTE),
  COUNTRY_OF_ORIGIN_CODE        VARCHAR2(2 BYTE),
  MVT_STAT_STATUS               VARCHAR2(30 BYTE),
  QUANTITY_BILLED               NUMBER,
  MATCH_FLAG                    VARCHAR2(1 BYTE),
  AMOUNT_BILLED                 NUMBER,
  MATCH_OPTION                  VARCHAR2(25 BYTE),
  OE_ORDER_HEADER_ID            NUMBER,
  OE_ORDER_LINE_ID              NUMBER,
  CUSTOMER_ID                   NUMBER,
  CUSTOMER_SITE_ID              NUMBER,
  LPN_ID                        NUMBER,
  TRANSFER_LPN_ID               NUMBER,
  MOBILE_TXN                    VARCHAR2(2 BYTE),
  SECONDARY_QUANTITY            NUMBER,
  SECONDARY_UNIT_OF_MEASURE     VARCHAR2(25 BYTE),
  QC_GRADE                      VARCHAR2(25 BYTE),
  SECONDARY_UOM_CODE            VARCHAR2(3 BYTE),
  PA_ADDITION_FLAG              VARCHAR2(1 BYTE) DEFAULT 'N',
  CONSIGNED_FLAG                VARCHAR2(1 BYTE),
  TRANSACTION_ID_N              NUMBER
);
